package Day3;

import java.util.Scanner;

public class TestCounter {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Counter c = new Counter();
        c.price=9999.9999;
        c.color = "粉红色";
        c.brand = "Rolls-Royce";
        c.Show();
        int choice=0;
        while (2>1){
            System.out.println("1、加法,2、减法,3、乘法,4、除法,5、算一个数的立方,9、退出");
            System.out.println("请输入选项：");
            choice=sc.nextInt();
            if (choice==1){
                System.out.println("请输入俩个数：");
                double n1 = sc.nextDouble();
                double n2 = sc.nextDouble();
                double j = c.Jia(n1,n2);
                System.out.println(j);
            }else if (choice==2){
                System.out.println("请输入俩个数：");
                double n1 = sc.nextDouble();
                double n2 = sc.nextDouble();
                double a = c.Jian(n1,n2);
                System.out.println(a);
            }else if (choice==3){
                System.out.println("请输入俩个数：");
                double n1 = sc.nextDouble();
                double n2 = sc.nextDouble();
                double ch = c.Chen(n1,n2);
                System.out.println(ch);
            }else if (choice==4){
                System.out.println("请输入俩个数：");
                double n1 = sc.nextDouble();
                double n2 = sc.nextDouble();
                double chu = c.Chu(n1,n2);
                System.out.println(chu);
            }else if (choice==5){
                System.out.println("请输入一个数：");
                double n1 = sc.nextDouble();
                double l = c.LiFang(n1);
                System.out.println(l);
            }else if (choice==9){
                break;
            }
        }
        System.out.println("感谢使用");

    }
}
